<?php

extract($_POST);

$dict = array();
for($i=0;$i<10;$i++)
{
    $k = $_POST["key".$i];
    if(strlen($k)==0) continue;
    $dict[$k]=$_POST["val".$i];
}
$sepChar = DIRECTORY_SEPARATOR;
$filename = str_replace('/',DIRECTORY_SEPARATOR,$_SERVER['DOCUMENT_ROOT']).$sepChar."data".$sepChar.$schema."_".$table.".ext";
$extData = unserialize(file_get_contents($filename));

$extData[$field]['Alias'] = $alias;
$extData[$field]['Dictionary']=json_encode($dict);
$extData[$field]['Description']=$description;

file_put_contents($filename,serialize($extData),LOCK_EX);

echo 'ok';
?>
